﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Photo.aspx.cs" Inherits="Jy123.Web.Manage.Album.Photo"
    EnableViewState="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="../css/custom/jquery.ui.css" rel="stylesheet" type="text/css" />
    <link href="../css/main.css" rel="stylesheet" type="text/css" />

    <script src="../js/jquery.js" type="text/javascript"></script>

    <script src="../js/jquery.ui.js" type="text/javascript"></script>

    <script src="../js/main.js" type="text/javascript"></script>

    <script language="javascript" type="text/javascript">
    $(function() {
        var showsel="";
        $("#chkall").click(function() {
            if (this.checked) {
                $('input[type=checkbox][name=albumchkedid]').attr('checked', true);
            }
            else {
                $('input[type=checkbox][name=albumchkedid]').attr('checked', false);
            }
        }),
        $(".sel").click(function(){
            if(showsel!="#"+this.id.replace('_','')) 
                $(showsel).css("display","none");
            if($("#"+this.id.replace('_','')).css("display")=="none")
                $("#"+this.id.replace('_','')).css("display","");
            else
                $("#"+this.id.replace('_','')).css("display","none");
            showsel = "#"+this.id.replace('_','');
        })
    });
    </script>

    <style type="text/css">
        .ptimg
        {
            width: 50px;
            height: 64px;
            border: 2px solid #CECABC;
            padding: 1px;
        }
    </style>
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <h4>
        <a href="#"><span>照片管理</span></a></h4>
    <div class="register">
        <h5>
            根据会员名字搜索照片</h5>
        <ul class="bb ">
            <li>
                <asp:TextBox ID="Key" runat="server" CssClass="text"></asp:TextBox></li>
            <li>
                <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="搜索" CssClass="button" /></li>
            
        </ul>
    </div>
    <asp:Repeater runat="server" ID="RptData">
        <HeaderTemplate>
            <table class="tblist">
                <tr>
                    <th>
                        序号
                    </th>
                    <th>
                        照片
                    </th>
                    <th>
                        创建人
                    </th>
                    <th>
                        所属相册
                    </th>
                    <th>
                        查看次数
                    </th>
                    <th>
                        上传时间
                    </th>
                    <th>
                        操作<input type="checkbox" value="1" id="chkall" />
                    </th>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr class="sel" id="_<%# Eval("ID")%>">
                <td>
                    <%# Container.ItemIndex + 1 + pagesize * (cpage - 1)%>
                </td>
                <td>
                    <a href="../../home/Album/AlbumView.aspx?r[0]=<%# Eval("FAlbum")%>&r[1]=<%# Eval("UserName")%>"
                        target="_blank"><a href="../../home/album/photoview.aspx?r[0]=<%# Eval("ID")%>" title="点击打开照片"
                            target="_blank">
                            <img alt="" src="<%# Eval("FilePath")%>" class="ptimg" /></a> </a>
                </td>
                <td>
                    <%# Eval("UserName")%>
                </td>
                <td>
                    <%# Eval("Title")%>
                </td>
                <td>
                    <%# Eval("Views")%>
                </td>
                <td>
                    <%# Eval("PostTime")%>
                </td>
                <td>
                    锁定：<%# isno(Eval("IsLock"))%>
                    <input type="checkbox" name="photochkedid" value="<%# Eval("ID")%>" />
                </td>
            </tr>
            <tr style="display: none;" id="<%# Eval("ID")%>">
                <td colspan="7">
                    <table class="tblist">
                        <tr>
                            <td colspan="2">
                                照片描述：
                            </td>
                            <td colspan="6">
                                <%# Eval("Description")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                用户：
                            </td>
                            <td>
                                <%# Eval("UserName")%>
                            </td>
                            <td>
                                查看次数：
                            </td>
                            <td>
                                <%# Eval("Views")%>
                            </td>
                            <td>
                                文件大小：
                            </td>
                            <td colspan="3">
                                <%# viewFileSize(Eval("FileSize"))%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                状态：
                            </td>
                            <td>
                                <%# Eval("State")%>
                            </td>
                            <td>
                                是否封面：
                            </td>
                            <td>
                                <%# isno(Eval("isCover"))%>
                            </td>
                            <td>
                                评论数：
                            </td>
                            <td>
                                <%# Eval("Comments")%>
                            </td>
                            <td>
                                发表时间：
                            </td>
                            <td>
                                <%# Eval("PostTime")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                发表IP：
                            </td>
                            <td>
                                <%# Eval("PostIP")%>
                            </td>
                            <td>
                                是否锁定：
                            </td>
                            <td>
                                <%# isno(Eval("isLock"))%>
                            </td>
                            <td>
                                头像/照片
                            </td>
                            <td>
                                <%# Eval("PhotoType")%>
                            </td>
                            <td>
                                宽度：
                            </td>
                            <td>
                                <%# Eval("Width")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                高度：
                            </td>
                            <td>
                                <%# Eval("Height")%>
                            </td>
                            <td>
                                文件名：
                            </td>
                            <td colspan="5">
                                <%# Eval("FilePath")%>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
            <tr>
                <td colspan="8" style="text-align: right;">
                    <% =string.Format("当前{0}/{1},共{2}条记录", cpage, count[1], count[0]) + PageString((int)count[1], cpage, "photo.aspx?page=$num$")%>
                </td>
            </tr>
            </table>
        </FooterTemplate>
    </asp:Repeater>
    <% =Message %>
    <div class="register">
        <h5>
            操作</h5>
        <ul>
            <li>
                <asp:Button ID="lockPhoto" CssClass="button" runat="server" Text="锁定" OnClick="lockPhoto_Click" /></li>
            <li>
                <asp:Button ID="unlockPhoto" CssClass="button" runat="server" Text="解锁" OnClick="unlockPhoto_Click" /></li>
                <li>
                <asp:Button ID="btnDel" CssClass="button" runat="server" Text="删除" 
                        onclick="btnDel_Click" /></li>
        </ul>
    </div>
    </form>
</body>
</html>
